<script type="text/javascript" >
    sttheme.load_tooltip();
    sttheme.on_submitform('#settingForm', function(){
        sttheme.loadPage('service', '', '<?php _e("Successful", $config['plugin_name']) ?>');
    });
    sttheme.loadUploadButton();
    sttheme.loadRemoveButton();
</script>
<div class="w100p bgl">
    <div class="w100p bgr p5b">
        <form class="stform" id="settingForm" action="<?php echo admin_url('/admin.php?page=' . $config['theme_name'] . '&action=' . $current_action) ?>" method="post" >
            <br clear="both" />
            <ul>

            	<li><h4>Service 1:</h4></li>
                <li>
                    <label><?php _e('Photo', $config['sttheme']); ?>:</label>
                    <div class="required">
                        <?php 
                        $class_hide = "hide";
                        if (!empty($option['image_service_1'])) {
                            $stplugin_picture_url = $option['image_service_1'];
                            $class_hide = "";
                        }
                        ?>
                        <input value="<?php echo $stplugin_picture_url ?>"  name="data[image_service_1]" id="id_stplugin_picture_1" type="hidden"/>
                        <div class="upload_button_div">
                            <span id="stplugin_picture_1" class="button image_upload_button">Upload photo</span>
                            <span pictureID="stplugin_picture_1" id="reset_stplugin_picture_1" class="button image_reset_button <?php echo $class_hide ?>">Remove</span>
                        </div>
                        <?php
                        if (!empty($option['image_service_1'])) {
                            ?>
                            <img alt="" src="<?php echo $stplugin_picture_url ?>" id="image_stplugin_picture" class="hide preview" style="display: inline;"/>
                        <?php } ?>
                    </div>
                    <br clear="both" />
                </li>
                <li>
                    <label><?php _e('Service', $config['plugin_name']) ?>:</label>
                    <div>
                       <select name="data[service_1]"  class="widefat">
                            <?php
                            $category_ids = get_all_category_ids();
                            foreach ($category_ids as $row) {
                                $cat_name = get_cat_name($row);
                                ?>
                                <option value="<?php echo $row ?>" <?php echo $option['service_1'] == $row ? 'selected' : '' ?>><?php echo $cat_name; ?></option>
                            <?php } ?>
                        </select>
                    </div>
                    <br clear="both" />
                </li>

                <li><h4>Service 2:</h4></li>
                <li>
                    <label><?php _e('Photo', $config['sttheme']); ?>:</label>
                    <div class="required">
                        <?php 
                        $class_hide = "hide";
                        if (!empty($option['image_service_2'])) {
                            $stplugin_picture_url = $option['image_service_2'];
                            $class_hide = "";
                        }
                        ?>
                        <input value="<?php echo $stplugin_picture_url ?>"  name="data[image_service_2]" id="id_stplugin_picture_2" type="hidden"/>
                        <div class="upload_button_div">
                            <span id="stplugin_picture_2" class="button image_upload_button">Upload photo</span>
                            <span pictureID="stplugin_picture_2" id="reset_stplugin_picture_2" class="button image_reset_button <?php echo $class_hide ?>">Remove</span>
                        </div>
                        <?php
                        if (!empty($option['image_service_2'])) {
                            ?>
                            <img alt="" src="<?php echo $stplugin_picture_url ?>" id="image_stplugin_picture" class="hide preview" style="display: inline;"/>
                        <?php } ?>
                    </div>
                    <br clear="both" />
                </li>
                <li>
                    <label><?php _e('Service', $config['plugin_name']) ?>:</label>
                    <div>
                        <select name="data[service_2]"  class="widefat">
                            <?php
                            $category_ids = get_all_category_ids();
                            foreach ($category_ids as $row) {
                                $cat_name = get_cat_name($row);
                                ?>
                                <option value="<?php echo $row ?>" <?php echo $option['service_2'] == $row ? 'selected' : '' ?>><?php echo $cat_name; ?></option>
                            <?php } ?>
                        </select>
                    </div>
                    <br clear="both" />
                </li>

                <li><h4>Service 3:</h4></li>
                <li>
                    <label><?php _e('Photo', $config['sttheme']); ?>:</label>
                    <div class="required">
                        <?php 
                        $class_hide = "hide";
                        if (!empty($option['image_service_3'])) {
                            $stplugin_picture_url = $option['image_service_3'];
                            $class_hide = "";
                        }
                        ?>
                        <input value="<?php echo $stplugin_picture_url ?>"  name="data[image_service_3]" id="id_stplugin_picture_3" type="hidden"/>
                        <div class="upload_button_div">
                            <span id="stplugin_picture_3" class="button image_upload_button">Upload photo</span>
                            <span pictureID="stplugin_picture_3" id="reset_stplugin_picture_3" class="button image_reset_button <?php echo $class_hide ?>">Remove</span>
                        </div>
                        <?php
                        if (!empty($option['image_service_3'])) {
                            ?>
                            <img alt="" src="<?php echo $stplugin_picture_url ?>" id="image_stplugin_picture" class="hide preview" style="display: inline;"/>
                        <?php } ?>
                    </div>
                    <br clear="both" />
                </li>
                <li>
                    <label><?php _e('Service', $config['plugin_name']) ?>:</label>
                    <div>
                        <select name="data[service_3]"  class="widefat">
                            <?php
                            $category_ids = get_all_category_ids();
                            foreach ($category_ids as $row) {
                                $cat_name = get_cat_name($row);
                                ?>
                                <option value="<?php echo $row ?>" <?php echo $option['service_3'] == $row ? 'selected' : '' ?>><?php echo $cat_name; ?></option>
                            <?php } ?>
                        </select>
                    </div>
                    <br clear="both" />
                </li>

                <li><h4>Service 4:</h4></li>
                <li>
                    <label><?php _e('Photo', $config['sttheme']); ?>:</label>
                    <div class="required">
                        <?php 
                        $class_hide = "hide";
                        if (!empty($option['image_service_4'])) {
                            $stplugin_picture_url = $option['image_service_4'];
                            $class_hide = "";
                        }
                        ?>
                        <input value="<?php echo $stplugin_picture_url ?>"  name="data[image_service_4]" id="id_stplugin_picture_4" type="hidden"/>
                        <div class="upload_button_div">
                            <span id="stplugin_picture_4" class="button image_upload_button">Upload photo</span>
                            <span pictureID="stplugin_picture_4" id="reset_stplugin_picture_4" class="button image_reset_button <?php echo $class_hide ?>">Remove</span>
                        </div>
                        <?php
                        if (!empty($option['image_service_4'])) {
                            ?>
                            <img alt="" src="<?php echo $stplugin_picture_url ?>" id="image_stplugin_picture" class="hide preview" style="display: inline;"/>
                        <?php } ?>
                    </div>
                    <br clear="both" />
                </li>
                <li>
                    <label><?php _e('Service', $config['plugin_name']) ?>:</label>
                    <div>
                        <select name="data[service_4]"  class="widefat">
                            <?php
                            $category_ids = get_all_category_ids();
                            foreach ($category_ids as $row) {
                                $cat_name = get_cat_name($row);
                                ?>
                                <option value="<?php echo $row ?>" <?php echo $option['service_4'] == $row ? 'selected' : '' ?>><?php echo $cat_name; ?></option>
                            <?php } ?>
                        </select>
                    </div>
                    <br clear="both" />
                </li>

                <li><h4>Service 5:</h4></li>
                <li>
                    <label><?php _e('Photo', $config['sttheme']); ?>:</label>
                    <div class="required">
                        <?php 
                        $class_hide = "hide";
                        if (!empty($option['image_service_5'])) {
                            $stplugin_picture_url = $option['image_service_5'];
                            $class_hide = "";
                        }
                        ?>
                        <input value="<?php echo $stplugin_picture_url ?>"  name="data[image_service_5]" id="id_stplugin_picture_5" type="hidden"/>
                        <div class="upload_button_div">
                            <span id="stplugin_picture_5" class="button image_upload_button">Upload photo</span>
                            <span pictureID="stplugin_picture_5" id="reset_stplugin_picture_5" class="button image_reset_button <?php echo $class_hide ?>">Remove</span>
                        </div>
                        <?php
                        if (!empty($option['image_service_5'])) {
                            ?>
                            <img alt="" src="<?php echo $stplugin_picture_url ?>" id="image_stplugin_picture" class="hide preview" style="display: inline;"/>
                        <?php } ?>
                    </div>
                    <br clear="both" />
                </li>
                <li>
                    <label><?php _e('Service', $config['plugin_name']) ?>:</label>
                    <div>
                        <select name="data[service_5]"  class="widefat">
                            <?php
                            $category_ids = get_all_category_ids();
                            foreach ($category_ids as $row) {
                                $cat_name = get_cat_name($row);
                                ?>
                                <option value="<?php echo $row ?>" <?php echo $option['service_5'] == $row ? 'selected' : '' ?>><?php echo $cat_name; ?></option>
                            <?php } ?>
                        </select>
                    </div>
                    <br clear="both" />
                </li>
                <li>
                    <input type="submit" value="Submit"/>
                </li>


            </ul>
        </form>
    </div>
</div>